\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{pstricks}

% Margins:
\addtolength{\hoffset}{-1.5cm}
\addtolength{\voffset}{-1.0cm}
\addtolength{\headheight}{0.5cm}
\addtolength{\textwidth}{4.0cm}
\addtolength{\textheight}{2.0cm}

\pagestyle{fancy}

  \def\TRTitle#1{\def\TRtitl@{#1}}
  \TRTitle{A Generic Technical Report}

  \def\TRAuthor#1{\def\TRauth@r{#1}}
  \TRAuthor{Generic Author One and Generic Author Two and Generic Author Three}

  \def\TRAuthorAffiliation#1{\def\TRauthAffili@r{#1}}
  \TRAuthor{Generic Author One and Generic Author Two and Generic Author Three}


  \def\TRNumber#1{\def\TRnumb@r{#1}}
  \TRNumber{025}

  \def\TRYear#1{\def\TRye@r{#1}}
  \TRYear{01}

  \def\TRMonth#1{\def\TRm@nth{#1}}
  \TRMonth{\month}
  
% Handy macro for current month and year, in Portuguese:

  \def\TRm@nthP{
    \ifcase\TRm@nth\or
    Janeiro\or Fevereiro\or Mar\c{c}o\or 
    Abril\or Maio\or Junho\or 
    Julho\or Agosto\or Setembro\or 
    Outubro\or Novembro\or Dezembro\fi
  }

  \def\TRm@nthE{
    \ifcase\TRm@nth\or
    January\or February\or March\or 
    April\or May\or June\or 
    July\or August\or September\or 
    October\or November\or December\fi
  }

% Cover page design

  \newcommand{\TRf@tbox}[2]{
    \vbox{\offinterlineskip
      \null\kern#1
      \hbox{\null\kern#1#2\kern#1\null}
      \kern#1\null
    }
  }
  
% Color boxes

  \ifx\colorbox\undefined
    \newcommand{\TRc@lorbox}[2]{\hbox{#2}}
  \else
    \newcommand{\TRc@lorbox}[2]{\colorbox{#1}{#2}}
  \fi

% Cover page main font style

  \ifx\xipt\undefined
    % (LaTeX 2e)
    \newcommand{\TR@sf}[1]{{\usefont{T1}{cmss}{m}{n}#1}}
    \newcommand{\TR@bf}[1]{{\usefont{T1}{cmr}{bx}{n}#1}}
    \newcommand{\TR@it}[1]{{\usefont{T1}{cmr}{m}{it}#1}}
    \newcommand{\TR@Huge}{\fontsize{25}{30pt}}
    \newcommand{\TR@LARGE}{\fontsize{17}{22pt}}
    \newcommand{\TR@normal}{\fontsize{11}{13.6pt}}
    \newcommand{\TR@small}{\fontsize{10}{12pt}}
    \DeclareMathSizes{11}{11}{8}{5}
  \else
    % (LaTeX 2.09)
    \newcommand{\TR@sf}[1]{{\sf#1}}
    \newcommand{\TR@bf}[1]{{\bf#1}}
    \newcommand{\TR@it}[1]{{\it#1}}
    % \newcommand{\TR@sf}[1]{{#1}}
    \newcommand{\TR@Huge}{\Huge}
    \newcommand{\TR@LARGE}{\LARGE}
    \newcommand{\TR@normal}{\normalsize}
    \newcommand{\TR@small}{\small}
  \fi
  \def\TR@titwd{11.7cm}

  \newsavebox{\TR@o}
  \newsavebox{\TR@x}
  \newsavebox{\TR@h}

% \TRMakeCover creates the cover page:

\newsavebox{\TR@tmpbox}
  
\def\TRMakeCover{
  	
    \bgroup
      \newpage
      \c@page\z@
      \thispagestyle{empty}
      \parindent 0pt
      \parskip 0pt
      \TR@normal
      \null
      \vskip -1cm
      
      \begin{center}
        \leavevmode
        \hbox to 10pt{
          \null\hss
          \TRc@lorbox{white}{
            \TRf@tbox{5pt}{
              \valign{\vfil##\vfil\cr
                \hbox{\includegraphics[width=.4\textwidth]{logo_uel_cinza.eps}}
                \cr
                \noalign{\kern 50pt}
                \hbox{
                  \includegraphics[width=.45\textwidth]{logo_dc_cinza.eps}                  
                }
                \cr
                \noalign{\kern 20pt}                
              }
            }
          }
          \hss
          \null
        }
        \vskip 5mm      
        \begin{center}
					\rule[1mm]{17cm}{3mm}%
				\end{center}
        \vskip 43mm
        \TRc@lorbox{white}{
          \TRf@tbox{4mm}{
            \framebox[105mm]{
              \vbox to 45mm{
                \hsize=100mm
                \textwidth=\hsize
                \linewidth=\hsize
                \null
                {\centering
                  \null
                  \baselineskip 12pt
                  \lineskip 1pt plus 3pt minus 0pt
                  \lineskiplimit 1pt
                  \vfill
                  \TR@normal\TR@bf{\TRtitl@\par}
                  \vskip 1.5ex
                  \TR@normal\TR@it{
                    \def\and{\end{tabular}\hskip 1em plus .17fil\begin{tabular}[t]{c}}
                    \begin{tabular}[t]{c}
                      \TRauth@r
                    \end{tabular}
                    \par
                  }
                  \vfill
                  %\TR@normal\TR@sf{
                  %  Technical Report
                  %  \quad-\quad
                  %  UEL-DC-{\TRye@r}-{\TRnumb@r}
                  %  \quad-\quad
                  %  Relat{\'o}rio T{\'e}cnico
                  %}
                  \par
                  \kern -5pt
                  \null
                }
                \null
              }
            }
          }
        }
        \vskip 40mm
        \begin{center}
					\rule[1mm]{17cm}{3mm}%
				\end{center}
        
        \vskip 2mm
        { 
          %\TR@normal\TR@sf{
          %  {\TRm@nthE}
          %  \quad-\quad
          %  20{\TRye@r}
          %  \quad-\quad
          %  {\TRm@nthP}
          %}
        }
        \par\vskip 5mm
        { 
          %\TR@small
          %\TR@sf{The contents of this report are the sole responsibility {}
          %of the authors.}
          %\par
          %\TR@sf{O conte{\'u}do do presente relat{\'o}rio {\'e} de {\'u}nica {}
          %responsabilidade dos autores.}
          %\par
        }
        \vfill
      \end{center}
      
    \newpage    
    \pagestyle{fancy}
    \thispagestyle{empty}    
		\noindent
		\begin{minipage}[tl]{28mm}
				\includegraphics[width=2\textwidth]{logo_uel_cinza.eps}
		\end{minipage}
		\hspace*{6.9cm}
		\begin{minipage}[tl]{124mm}
				\includegraphics[width=.55\textwidth]{logo_dc_cinza.eps}
		\end{minipage}
		\vspace*{1.0cm}
		\begin{center}
				{\LARGE {\bf \TRtitl@}}
		\end{center}
		\vspace*{0.5cm}
		\begin{center}
    \begin{tabular}[t]{c}
    		%\TRauth@r
    		\TRauthAffili@r
    \end{tabular}
    \end{center}
    \vspace*{0.2cm}
    
		\lhead{\includegraphics[width=.2\textwidth]{logo_uel_cinza.eps}}
		\rhead{\includegraphics[width=.2\textwidth]{logo_dc_cinza.eps}}
		%\lfoot{\TR@normal\TR@sf{UEL-DC-{\TRye@r}-{\TRnumb@r}}}
		\cfoot{}		
		\rfoot{\thepage}      
    \egroup
    \c@page\z@
    \addtocounter{page}{1}
}
  
 
